chore(lint): migrate to flint v2 binary#272
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the repo’s linting workflow from flint v1 (remote task scripts + super-linter) to the flint v2 binary, with native lint tool installation managed by mise.
Changes:
- Add flint v2 as a
misetool and introduce native linters (shellcheck, shfmt, actionlint, hadolint, markdownlint, prettier, codespell, editorconfig-checker). - Replace previous lint tasks with
flint runvariants and update pre-commit hook generation to call the new task. - Add flint configuration (
.github/config/flint.toml), remove super-linter config, and regenerate renovate tracked deps.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
mise.toml |
Adds flint + native lint tools; replaces old lint tasks with flint run tasks; updates pre-commit hook task target; adjusts check dependencies. |
.github/renovate-tracked-deps.json |
Updates tracked mise tools list to include new linters and flint tool source. |
.github/config/super-linter.env |
Removed super-linter configuration (no longer used). |
.github/config/flint.toml |
Adds flint configuration (excludes + renovate-deps manager exclusions). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bbad50a to
e3ba4ed
Compare
e3ba4ed to
48eff5a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Summary Introduces the `flint` Rust binary: a mise-native lint orchestrator that replaces the v1 bash task scripts. **How it works**: reads installed tools from `mise.toml`, maps them to a built-in check registry, runs checks against changed files (merge-base diff) in parallel. Special checks (lychee links, renovate-deps) are implemented in Rust. ## File breakdown 282 files changed — the count is misleading without context: | Category | Files | |---|---| | `tests/` — e2e test fixtures (70 test cases × ~3-4 files each) | 248 | | `src/` — Rust source | 13 | | Config, docs, CI, Cargo | 21 | The 23 linters covered by e2e tests: actionlint, biome, biome-format, cargo-clippy, cargo-fmt, codespell, dotnet-format, editorconfig-checker, gofmt, golangci-lint, google-java-format, hadolint, ktlint, license-header, lychee, markdownlint-cli2, prettier, renovate-deps, ruff, ruff-format, shellcheck, shfmt, plus general cases. ## What's not in this PR **Deferred features:** - `flint hook install` — installs a git pre-commit hook; replaces the per-repo `mise run setup:pre-commit-hook` task with something self-contained in the CLI - `check_task` / `fix_task` in `flint.toml` — allows a fast script (e.g. regex/Python) as the check with a slow canonical fixer (e.g. Gradle); motivating use case: javaagent's `StaticImportFormatter` - Biome config injection — `--config-path` takes a directory, not a file; needs a directory-injection variant in the registry API **Low-priority linters** (no consuming repo needs them yet): - `merge-conflict-markers` — pure-Rust special check - `dotenv-linter`, `go-mod-tidy`, `xmllint` **Post-merge:** - Bash task scripts (`tasks/lint/`) — retire once consumer PRs are merged - GitHub release / `github:grafana/flint` registration — cut after this PR merges; consumer repos switch from branch tracking to a pinned version ## Consumer migration status All 7 consumer PRs green — validated across Rust, Go, Java, Kotlin, Python, .NET, Shell, Dockerfile: - grafana/mox [#63](grafana/mox#63) - grafana/oats [#272](grafana/oats#272) - grafana/otel-checker [#267](grafana/otel-checker#267) - grafana/grafana-opentelemetry-java [#1251](grafana/grafana-opentelemetry-java#1251) - grafana/docker-otel-lgtm [#1243](grafana/docker-otel-lgtm#1243) - prometheus/client_java [#1988](prometheus/client_java#1988) - open-telemetry/opentelemetry-java-instrumentation [#17759](open-telemetry/opentelemetry-java-instrumentation#17759) ## Test plan - [x] CI passes - [x] `flint list` shows all registry entries with correct installed/missing status - [x] All 7 consumer PRs pass CI Release-As: 0.20.0 --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
0f39b6d to
124e306
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This reverts commit 2657b07. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Migrates oats from flint v1 (remote bash task scripts) to the flint v2 binary.
Changes
github:grafana/flint = "0.20.3"as a mise toollint:super-linter,lint:links,lint:renovate-deps, andsetup:native-lint-toolswithflint run/flint run --fixchecktask as the run-everything entrypoint.github/config/flint.tomlwith excludes (yaml/testdata/,yaml/docker-compose-docker-lgtm-template.yml) and renovate-deps manager exclusions.editorconfigso editorconfig-checker owns markdown line length enforcementsuper-linter.env(replaced by flint.toml)renovate-tracked-deps.jsonCoverage gaps vs super-linter
VALIDATE_ENV(dotenv-linter) — low-priority, no .env files in repoVALIDATE_GIT_MERGE_CONFLICT_MARKERS— low-priorityTest plan
mise run lintpasses locallymise run checkpasses locally